// pages/repair/repair.js
const request = require("../../utils/request.js")

Page({

  /**
   * 页面的初始数据
   */
  data: {
    list:[
      {id:1,image:"/starc/img/coffee1.png",title:"咖啡机咖啡机1",text:"1",text2:"22期",price:"200",price1:"500",lon:"代付款",show1:'1',url:"/pages/daifukuan/daifukuan"},
      {id:2,image:"/starc/img/coffee2.png",title:"咖啡机咖啡机1",text:"1",text2:"22期",price:"200",price1:"500",lon:"代收货",show2:'1',url:"/pages/daishouhuo/daishouhuo"},
      {id:3,image:"/starc/img/coffee2.png",title:"咖啡机咖啡机1",text:"1",text2:"22期",price:"200",price1:"500",lon:"租赁中",show3:'1',url:"/pages/zulingzhong/zulingzhong"},
      {id:4,image:"/starc/img/coffee2.png",title:"咖啡机咖啡机1",text:"1",text2:"22期",price:"200",price1:"500",lon:"已到期",show3:'1',url:"/pages/yidaoqi/yidaoqi"},
      {id:5,image:"/starc/img/coffee2.png",title:"咖啡机咖啡机1",text:"1",text2:"22期",price:"200",price1:"500",lon:"已归还",show3:'1',url:"/pages/yiguihuan/yiguihuan"}
    ],
    list1:[
      {id:1,image:"/starc/img/coffee1.png",title:"咖啡机咖啡机1",text:"1",text2:"22期",price:"200",price1:"500",lon:"代付款",show1:'1',url:"/pages/daifukuan/daifukuan"}
    ],
    list2:[
      {id:2,image:"/starc/img/coffee2.png",title:"咖啡机咖啡机1",text:"1",text2:"22期",price:"200",price1:"500",lon:"代收货",show2:'1',url:"/pages/daishouhuo/daishouhuo"},
    ],
    list3:[
      {id:3,image:"/starc/img/coffee2.png",title:"咖啡机咖啡机1",text:"1",text2:"22期",price:"200",price1:"500",lon:"租赁中",show3:'1',url:"/pages/zulingzhong/zulingzhong"},
    ],
    list4:[
      {id:4,image:"/starc/img/coffee2.png",title:"咖啡机咖啡机1",text:"1",text2:"22期",price:"200",price1:"500",lon:"已到期",show3:'1',url:"/pages/yidaoqi/yidaoqi"},
    ],
    list5:[
      {id:5,image:"/starc/img/coffee2.png",title:"咖啡机咖啡机1",text:"1",text2:"22期",price:"200",price1:"500",lon:"已归还",show3:'1',url:"/pages/yiguihuan/yiguihuan"}
    ],
    zulinList:''
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    // 租赁订单
    this.getzulinList();
  },
  // 租赁订单
  getzulinList:function () {
    const _this = this
    request.wxRequest('order/list', function (err, data) {
      console.log(data.data.list)
      if (err) {
        // 失败；
      } else {
        _this.setData({
          zulinList: data.data.list
        })
      }
    }, 'GET', {
      
    })
  },
  jump:function(){
    wx.navigateTo({
     url: '/pages/saoyisao/saoyisao',
    })
   
   },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {

  }
})